<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>用户</title>
</head>
<body>
<form th:action="@{/adduser}" method="post">
    <table>
        <tr>
            <td>姓名：</td>
            <td><input type="hidden" name="id" th:value="${user.id}"/><input type="text" name="username" th:value="${user.username}"/></td>
            <td><font color="red" th:errors="${user.username}"></font></td>
        </tr>
        <tr>
            <td>年龄:</td>
            <td><input type="text" name="age" th:value="${user.age}"/></td>
            <td><font color="red" th:errors="${user.age}"></font></td>
        </tr>
    </table>
    <input type="submit"/>
</form>
<br/>
<a th:href="@{/}">返回</a>
</body>
</html>